<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>配网监控系统</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<link rel="stylesheet" type="text/css"
			href="<s:url value='../css/main.css'/>">
		<link id="easyuiTheme" rel="stylesheet" type="text/css"
			href="<s:url value='../jquery-easyui/themes/stategrid/easyui.css'/>">
		<link rel="stylesheet" type="text/css"
			href="<s:url value='../jquery-easyui/themes/icon.css'/>">
		<script type="text/javascript"
			src="<s:url value='../jquery-easyui/jquery-1.7.2.min.js'/>"></script>
		<script type="text/javascript"
			src="<s:url value='../jquery-easyui/jquery.easyui.min.js'/>"></script>
		<script type="text/javascript"
			src="<s:url value='../jquery-easyui/locale/easyui-lang-zh_CN.js'/>"></script>
		<script type="text/javascript"
			src="<s:url value='../js/common/commonUtil.js'/>"></script>
		<script type="text/javascript"
			src="<s:url value='../js/common/datagridCommon.js'/>"></script>

		<style type="text/css">
</style>

		<script type="text/javascript"><!--
		$(function(){
			
			var datagridId = "bureauDatagrid"; // 数据集对应table的id
			var listUrl = "../archives/showBureaus.action"; // 请求数据集的action
			var title = "供电局信息"; // 数据集的标题
			var columns = [[
					{field: 'bureauId', hidden: true},
					{field: 'bureauNo', title: '供电局编号', width: $(this).width() * 0.10},
					{field: 'bureauName', title: '供电局名称', width: $(this).width() * 0.35},
					{field: 'bureauAddr', title: '供电局地址', width: $(this).width() * 0.35},
					{field: 'bureauTelephone', title: '联系电话', width: $(this).width() * 0.20}
				]]; // 数据集的列信息，列标题，对应的内容和宽度
		    
		    /**
		     *编辑参数，新增和编辑共用同一个表单，在编辑操作和新增操作中这些参数是一样的
		     *modalWinId：彈出窗口id
		     *submitBtnId： 提交按鈕id
		     *formId：表單id
		     *msgFlag：請求action，返回消息對應的屬性
		     ***/
		    var editParams = {
    				modalWinId: "addOrEditWin", 
    				submitBtnId: "addOrEditBtn",
    				formId: "form",
    				msgFlag: "msg"
		    	};	
		    	
		    var addParams = {
    				addUrl: "../archives!addOrModifyBureau.action"
				};// 新增操作参数，包括新增操作请求地址
		    var modifyParams = {
		    		loadUrl: "../archives/loadBureauByPk.action",
		    		identityId: ["bureauId"],
		    		modifyUrl: "../archives!addOrModifyBureau.action"
		    	};// 修改操作参数，包括修改操作请求地址
		    
		    // 删除操作参数，包括删除操作请求地址，行唯一主键，请求action，返回消息对应的json属性
		    var removeParams = {
		    		removeUrl: "../archives!removeBureauById.action", 
    				identityId: "bureauId",
    				msgFlag: "msg"
    			};

			/**
			*查询操作参数
			*queryFormId：查询表单id
			*queryBtnId：查询按钮id
			*/
			var queryParams = {
				queryFormId: "queryForm",
				queryBtnId: "queryBtnFunc"
			}
			
			/**
			导出excel记录
			**/
			var exportParams = {
				exportUrl: "../archives/exportBureaus.action"
			}
			
			//显示表单
			showDataGrid(datagridId, listUrl, title, columns, editParams, addParams, removeParams, queryParams, modifyParams, exportParams);
			
		});
		
--></script>
	</head>

	<body>
		<div id="addOrEditWin" class="easyui-window"
			style="padding: 10px; width: 360px; height: 228px;" closed="true"
			maximizable="false" minimizable="false" collapsible="false">
			<div id="formDiv" style="text-align: align;">
				<form id="form" method="post">
					<input type="hidden" id="bureauId" name="bureauId" />
					<table class="editTable">
						<tr>
							<td class="tdText">
								供电局编号
							</td>
							<td>
								<input class="easyui-validatebox inputText" type="text"
									id="bureauNo" name="bureauNo" required="true" />
							</td>
						</tr>
						<tr>
							<td class="tdText">
								供电局名称
							</td>
							<td>
								<input class="easyui-validatebox inputText" type="text"
									id="bureauName" name="bureauName" required="true" />
							</td>
						</tr>
						<tr>
							<td class="tdText">
								供电局地址
							</td>
							<td>
								<input class="easyui-validatebox inputText" type="text"
									id="bureauAddr" name="bureauAddr" required="true" />
							</td>
						</tr>
						<tr>
							<td class="tdText">
								联系电话
							</td>
							<td>
								<input class="easyui-validatebox inputText" type="text"
									id="bureauTelephone" name="bureauTelephone" required="true" />
							</td>
						</tr>
						<tr>
							<td colspan="2" align="center">
								<a class="easyui-linkbutton" id="addOrEditBtn"
									href="javascript:void(0)"></a>
								<a class="easyui-linkbutton" iconCls="icon-cancel"
									id="addOrEditsstn" href="javascript:void(0)"
									onclick="winClose('addOrEditWin')">取消</a>
							</td>
						</tr>
					</table>
				</form>
			</div>
		</div>
		<s:form theme="simple" id="queryForm" cssClass="queryForm">
			<table class="queryTable">
				<tr>
					<td class="tdText">
						供电局名称
					</td>
					<td>
						<s:textfield name="bureauName" id="bureauName"
							cssClass="inputText"></s:textfield>
					</td>
					<td class="tdText">
						地址
					</td>
					<td>
						<s:textfield name="bureauAddr" id="bureauAddr"
							cssClass="inputText"></s:textfield>
					</td>
					<td class="tdText">
						联系电话
					</td>
					<td>
						<s:textfield name="bureauTelephone" id="bureauTelephone"
							cssClass="inputText"></s:textfield>
					</td>
					<td class="tdQueryBtn" align="center">
						<input type="button" value="查询" class="queryBtn" id="queryBtnFunc" />
					</td>
				</tr>
			</table>
		</s:form>
		<a href="../reports/archives_report_allBureaus_HTML.action"
			style="text-decoration: none; font-size: 12px; padding-top: 3px; padding-left: 20px; background: url('../images/right_flag.gif') no-repeat;">HTML格式报表</a>
		<a href="../reports/archives_report_allBureaus_XLS.action"
			style="text-decoration: none; font-size: 12px; padding-top: 3px; padding-left: 20px; background: url('../images/excel.gif') no-repeat;">EXCLE格式报表</a>
		<a href="../reports/archives_report_allBureaus_PDF.action"
			style="text-decoration: none; font-size: 12px; padding-top: 3px; padding-left: 20px; background: url('../images/pdf.gif') no-repeat;">PDF格式报表</a>
		<a href="../jsp/demo/curve.jsp"
			style="text-decoration: none; font-size: 12px; padding-top: 3px; padding-left: 20px; background: url('../images/right_flag.gif') no-repeat;">曲线图</a>
		<table id="bureauDatagrid">
		</table>
	</body>
</html>
